<style scoped>
  .layout {
    border: 1px solid #d7dde4;
    background: #f5f7f9;
  }

  .layout-nav {
    width: 420px;
    margin: 0 auto;
  }

  .layout-breadcrumb {
    padding: 10px 15px 0;
  }

  .layout-content {
    min-height: 200px;
    margin: 15px;
    overflow: hidden;
    background: #fff;
    border-radius: 4px;
  }

  .layout-copy {
    text-align: center;
    padding: 10px 0 20px;
    color: #9ea7b4;
  }
</style>
<template>
  <div class="layout">
    <Menu mode="horizontal" theme="dark" active-name="1">
      <!--<div class="layout-logo"></div>-->
      <div class="layout-nav">
        <router-link id="1" tag="a" to="/TaskDateList">
          <Menu-item name="1">
            <Icon type="ios-keypad"></Icon>
            到时间执行
          </Menu-item>
        </router-link>

        <router-link id="2" tag="a" to="/TaskCronList">
          <!-- class="ivu-menu-item-active ivu-menu-item-selected">-->
          <Menu-item name="2">
            <Icon type="ios-analytics"></Icon>
            cron表达式
          </Menu-item>
        </router-link>

        <Menu-item name="3">
          <Icon type="ios-paper"></Icon>
          关于
        </Menu-item>


      </div>
    </Menu>
    <div class="layout-breadcrumb">
      <Breadcrumb>
        <Breadcrumb-item href="#">{{bread}}</Breadcrumb-item>
      </Breadcrumb>
    </div>
    <div class="layout-content">
      <router-view></router-view>
    </div>
    <div class="layout-copy">
      2017-2017 &copy;
    </div>
  </div>
</template>
<script>
  import router from './router/router'
  export default {
    data () {
      return {
        bread: '任务列表'
      }
    },
    methods: {
      path () {
      }
    },
    beforeCreate: function () {
      var path = this.$route.path;
      if (path !== '/TaskDateList') {
        router.push('/TaskDateList')
      }
    }
  }
</script>
